﻿package com.sorayume.script {
		
	public class SY_Chapter {
		
		private var _id:String = "";
		private var _length:int = 0;
		
		private var _xml:XMLList = null;
		
		public function SY_Chapter(id:String, sourceXML:XMLList):void 
		{
			//Constructor code
			_length = sourceXML.length();
			_id = id;
			
			_xml = sourceXML;
		}
		
		public function cmdAt(index:int = 0):*
		{
			if (index > _length - 1) { return false; }
			
			return _xml[index];
		}
		
		public function length():int
		{
			return _length;
		}
		
		public function id():String 
		{
			return _id;
		}
		
	}
	
}